{literal}

<script>
function getLangTranslations(languagesId){
	var localeSectionsId = $('#sectionList').val();
	if (localeSectionsId != 0){
		$.ajax({
			type: "GET",
			url: "/locale/lang-translations",
			data: {
				languagesId : languagesId,
				localeSectionsId : localeSectionsId
			},
			success: function(data){
				//showPopup(data, 'Add new default', false);
				$('#translationsBox').html(data);
			},
			error: function(xhr, statusText, errorThrown){
				showPopup(xhr.responseText, statusText, false);
			}    
		
		});
	} else {
		alert('Please select localization section');
	}
}
</script>

{/literal}

{strip}
<!-- content -->
<div id="backoffice" >
	<div id="translations">
		CHOOSE SECTION:
			<select id="sectionList" onchange="getLangTranslations({$languagesId});">
				<option value="0">--- ----</option>
				{foreach $sections as $k=>$v}
					<option value="{$v->getId()}">{$v->getSection()}</option>
				{/foreach}
			</select>
			<br />
			<div id="translationsBox"> </div>
		</div>
	</div>
</div>
<!-- end content  -->
{/strip}